{include file="stddecor.form.open.tpl" }
<table cellspacing="0" class="objHeader">
<tr>
    <td class="objHeader-td-icon"><img src="{$SPIcfg.dir.pubsite_styles|escape}manage/image/topic_icons/{$data.topic|escape}.gif" /></td>
    <td class="objHeader-td-header">
        <div>
            <h1>{$data.title|escape}</h1>
            <h2>{$data.subtitle|escape}</h2>
        </div>

        <div class="objHeader-action_buttons">
            <div class="right">{include file="obj.button.tpl" name="Назад" link=$data.link_back icon="back" }</div>
            <br class="clear" />
        </div>
    </td>
</tr>
</table>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{include file="stddecor.form.open.tpl" }

<form id="cntForm" name="cntForm" method="post" action="{$data.link_form_submit|escape}">
{foreach from=$data.formvars key=varname item=varvalue }
<input type="hidden" name="{$varname|escape}" value="{$varvalue|escape}" />
{/foreach}

<center>
<table cellspacing="8" class="cntForm">
<tr>
    <td class="cntForm-td-title">
        {if $content.item_fields.is_new }
            <div class="right"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_star" /></div>
        {else}
            <div class="right"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_star_disabled" /></div>
        {/if}
        <div>Статус сообщения:</div>
    </td>
    <td class="cntForm-td-object">
        <select class="select" name="field[is_new]">
            <option value="1"{if '1' == $content.item_fields.is_new } selected="selected"{/if}>Новое сообщение</option>
            <option value="0"{if '0' == $content.item_fields.is_new } selected="selected"{/if}>Обработанное сообщение</option>
        </select>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__is_new"></td>
</tr>

<tr>
    <td class="cntForm-td-title">
        {if $content.item_fields.is_public }
            <div class="right"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_on" /></div>
        {else}
            <div class="right"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_off" /></div>
        {/if}
        <div>Статус публикации:</div>
    </td>
    <td class="cntForm-td-object">
        <select class="select" name="field[is_public]">
            <option value="1"{if '1' == $content.item_fields.is_public } selected="selected"{/if}>Сообщение активно и опубликовано на сайте</option>
            <option value="0"{if '0' == $content.item_fields.is_public } selected="selected"{/if}>Сообщение не активно и скрыто с сайта</option>
        </select>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__is_public"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr valign="top">
    <td class="cntForm-td-title"><div>E-mail отправителя:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text" name="field[email]" value="{$content.item_fields.email|escape}" />
            <div class="button_container__const_email"><a nohref="nohref=" class="small light" onclick="$('.button_container__const_email').hide(); $('.container__const_email').slideDown(500);">показать значение присланное пользователем</a></div>
            <div onclick="$(this).slideUp(300, function() {ldelim} $('.button_container__const_email').show(); {rdelim} );" class="hidden container__const_value container__const_email">{$content.item_fields.const_email|escape|nl2br}</div>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__email"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr valign="top">
    <td class="cntForm-td-title"><div>Имя отправителя:</div><div class="small light">Публичное значение</div></td>
    <td class="cntForm-td-object">
        <div><input type="text" class="text" name="field[name]" value="{$content.item_fields.name|escape}" /></div>
            <div class="button_container__const_name"><a nohref="nohref=" class="small light" onclick="$('.button_container__const_name').hide(); $('.container__const_name').slideDown(500);">показать значение присланное пользователем</a></div>
            <div onclick="$(this).slideUp(300, function() {ldelim} $('.button_container__const_name').show(); {rdelim} );" class="hidden container__const_value container__const_name">{$content.item_fields.const_name|escape|nl2br}</div>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__name"></td>
</tr>

<tr valign="top">
    <td class="cntForm-td-title"><div>Вопрос:</div><div class="small light">Публичное значение</div></td>
    <td class="cntForm-td-object">
        <textarea cols="60" rows="10" class="textarea" name="field[message]">{$content.item_fields.message|escape}</textarea>
            <div class="button_container__const_message"><a nohref="nohref=" class="small light" onclick="$('.button_container__const_message').hide(); $('.container__const_message').slideDown(500);">показать значение присланное пользователем</a></div>
            <div onclick="$(this).slideUp(300, function() {ldelim} $('.button_container__const_message').show(); {rdelim} );" class="hidden container__const_value container__const_message">{$content.item_fields.const_message|escape|nl2br}</div>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__message"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
    <td class="cntForm-td-title"><div>Ответ:</div><div class="small light">Публичное значение</div></td>
    <td class="cntForm-td-object" colspan="2">
        {include file="widget/spaw2.tpl" varname="field[answer]" editor_varname=answer_ExtEditor editor=$content.item_fields.answer_ExtEditor }
    </td>
</tr>

<tr><td>&nbsp;</td></tr>

{if $data.formmode == 'options:insert' }
<tr>
    <td class="cntForm-td-title"><div>Позиция в списке:</div></td>
    <td class="cntForm-td-object">
        <input type="radio" name="order_position" value="first" /> в начале списка<br />
        <input type="radio" name="order_position" value="last" checked="checked" /> в конце списка
    </td>
    <td class="cntForm-td-error"></td>
</tr>
{/if}

{if $content.item_fields.t_created }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата создания:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_created|date}</div></td>
    <td></td>
</tr>
{/if}

{if $content.item_fields.t_updated }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата модификации:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_updated|date}</div></td>
    <td></td>
</tr>
{/if}

</table>

<div class="splitter padded"></div>

<table cellspacing="8" cellpadding="0">
<tr>
    <td>{include file="obj.button.tpl" name="Сохранить" onclick="cntForm_submit()" icon="save" }</td>
    <td width="25">&nbsp;</td>
    <td>{include file="obj.button.tpl" name="Отменить" link=$data.link_back icon="cancel" }</td>
</tr>
</table>

</center>

</form>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{include file="media/manager.tpl" item_title="Вложение %s" media=$content.media }

{* ************************************************************************* *}
